package com.shuoyue.ycgk.ui.mine.vip;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;
import com.shuoyue.ycgk.entity.VipPurchased;

import java.util.List;

public class MyVipAdapter extends AppBaseQuickAdapter<VipPurchased> {
    public MyVipAdapter(@Nullable List<VipPurchased> data) {
        super(R.layout.item_my_vip, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, VipPurchased item) {
        helper.setText(R.id.days, String.valueOf(item.getEffectiveTime()));
        helper.setText(R.id.name, item.getSubjectType() == null ? "" : item.getSubjectType().getName());
        helper.setText(R.id.vilidate, "截止" + item.getValidDate() + "到期");
        helper.setGone(R.id.status,item.getStatus()==1);
    }
}
